package com.study.hot

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.alibaba.android.arouter.facade.annotation.Route
import com.study.hot.flutter.JumpFlutterPageActivity
import com.study.hot.jetpack.JetpackMainActivity
import com.study.hot.jetpack.databinding.MvvmActivity
import com.study.hot.rx.RxActivity
import io.flutter.embedding.android.FlutterActivity
import kotlinx.android.synthetic.main.activity_hot_main.*
import org.jetbrains.anko.sdk27.coroutines.onClick
import org.jetbrains.anko.startActivity

/**
 * <pre>
 *     author : fauks
 *     time   : 2020/03/21
 *     desc   :
 * </pre>
 */
@Route(path = "/hot/hot")
class HotMainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_hot_main)

        toMvvmBtn.onClick {
            startActivity<MvvmActivity>()
        }

        toRxBtn.onClick {
            startActivity<RxActivity>()
        }

        toJetpackBtn.onClick {
            startActivity<JetpackMainActivity>()
        }

        toFlutterBtn.onClick {
            startActivity<JumpFlutterPageActivity>()
        }
    }
}